package com.imodia.checkoo.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.hsq.commons.util.db.GenericIbatisDao;
import com.hsq.commons.util.db.SqlParam;
import com.hsq.commons.util.db.annotation.SqlSpace;
import com.imodia.checkoo.bean.CmsArticleSiteBean;
import com.imodia.checkoo.service.CmsArticleSiteService;


@SqlSpace(spaceName="cmsarticlesite")
@Service
public class CmsArticleSiteServiceImpl 	extends GenericIbatisDao<CmsArticleSiteBean, Integer> implements CmsArticleSiteService{
	
	public void save(List<CmsArticleSiteBean> list,int articleId){
		SqlParam sql = new SqlParam();
		sql.andEqualTo("article_id", String.valueOf(articleId));
		super.delete(sql);
		super.batchInsert(list);
	}
	
}